package com.ruoyi.books.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.books.mapper.BooksHistoryMapper;
import com.ruoyi.books.domain.BooksHistory;
import com.ruoyi.books.service.IBooksHistoryService;

/**
 * 非遗历史发展Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-03-27
 */
@Service
public class BooksHistoryServiceImpl implements IBooksHistoryService 
{
    @Autowired
    private BooksHistoryMapper booksHistoryMapper;

    /**
     * 查询非遗历史发展
     * 
     * @param historyId 非遗历史发展主键
     * @return 非遗历史发展
     */
    @Override
    public BooksHistory selectBooksHistoryByHistoryId(Long historyId)
    {
        return booksHistoryMapper.selectBooksHistoryByHistoryId(historyId);
    }

    /**
     * 查询非遗历史发展列表
     * 
     * @param booksHistory 非遗历史发展
     * @return 非遗历史发展
     */
    @Override
    public List<BooksHistory> selectBooksHistoryList(BooksHistory booksHistory)
    {
        return booksHistoryMapper.selectBooksHistoryList(booksHistory);
    }

    /**
     * 新增非遗历史发展
     * 
     * @param booksHistory 非遗历史发展
     * @return 结果
     */
    @Override
    public int insertBooksHistory(BooksHistory booksHistory)
    {
        return booksHistoryMapper.insertBooksHistory(booksHistory);
    }

    /**
     * 修改非遗历史发展
     * 
     * @param booksHistory 非遗历史发展
     * @return 结果
     */
    @Override
    public int updateBooksHistory(BooksHistory booksHistory)
    {
        return booksHistoryMapper.updateBooksHistory(booksHistory);
    }

    /**
     * 批量删除非遗历史发展
     * 
     * @param historyIds 需要删除的非遗历史发展主键
     * @return 结果
     */
    @Override
    public int deleteBooksHistoryByHistoryIds(Long[] historyIds)
    {
        return booksHistoryMapper.deleteBooksHistoryByHistoryIds(historyIds);
    }

    /**
     * 删除非遗历史发展信息
     * 
     * @param historyId 非遗历史发展主键
     * @return 结果
     */
    @Override
    public int deleteBooksHistoryByHistoryId(Long historyId)
    {
        return booksHistoryMapper.deleteBooksHistoryByHistoryId(historyId);
    }
}
